package com.youlai.boot.factory.model.form;

import java.io.Serial;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.*;

/**
 * 报工工序明细表单对象
 *
 * @author youlaitech
 * @since 2025-10-16 15:34
 */
@Getter
@Setter
@Schema(description = "报工工序明细表单对象")
public class WorkOrderProcessForm implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @Schema(description = "主键ID")
    @NotNull(message = "主键ID不能为空")
    private Long id;

    @Schema(description = "报工单ID")
    @NotNull(message = "报工单ID不能为空")
    private Long workReportId;

    @Schema(description = "该工序该次报工数量")
    @NotNull(message = "该工序该次报工数量不能为空")
    private Integer workReportQuantity;

    @Schema(description = "工序ID")
    @NotNull(message = "工序ID不能为空")
    private Long processId;

    @Schema(description = "创建人")
    @NotBlank(message = "创建人不能为空")
    @Size(max=50, message="创建人长度不能超过50个字符")
    private String createBy;

    @Schema(description = "创建时间")
    @NotNull(message = "创建时间不能为空")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createTime;

    @Schema(description = "更新人")
    @Size(max=50, message="更新人长度不能超过50个字符")
    private String updateBy;

    @Schema(description = "更新时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateTime;

    @Schema(description = "报工时的工序单价")
    @NotNull(message = "报工时的工序单价不能为空")
    private BigDecimal unitPrice;
}
